﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainFrameNoJs.Master" Inherits="System.Web.Mvc.ViewPage<GPMS.Model.Setting>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    系统设置
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>系统设置</h2>
<%Html.EnableClientValidation(); %>
<% using (Html.BeginForm("Setting", "Administrator", null, FormMethod.Post, new { id = "formsetting" }))
   { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Setting</legend>

        <%: Html.HiddenFor(model => model.ID) %>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.MaxSelect) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.MaxSelect) %>
            <%: Html.ValidationMessageFor(model => model.MaxSelect) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.MaxPublish) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.MaxPublish) %>
            <%: Html.ValidationMessageFor(model => model.MaxPublish) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.PageSize) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.PageSize) %>
            <%: Html.ValidationMessageFor(model => model.PageSize) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Announcement) %>
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.Announcement)%>
            <%: Html.ValidationMessageFor(model => model.Announcement)%>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.IsClose) %>
        </div>
        <div class="editor-field">
            <%: Html.CheckBoxFor(model => model.IsClose)%>
            <%: Html.ValidationMessageFor(model => model.IsClose)%>
        </div>
         <div class="editor-label">
            <%: Html.LabelFor(model => model.TeacherRole) %>
        </div>
        <div class="editor-field">
            <%: Html.DropDownListFor(model=>model.TeacherRole,new SelectList(ViewData["roles"] as IEnumerable,"RoleID","RoleName",Model.TeacherRole))%>
            <%: Html.ValidationMessageFor(model => model.StudentRole)%>
        </div>
         <div class="editor-label">
            <%: Html.LabelFor(model => model.StudentRole)%>
        </div>
        <div class="editor-field">
            <%: Html.DropDownListFor(model => model.StudentRole, new SelectList(ViewData["roles"] as IEnumerable, "RoleID", "RoleName", Model.StudentRole))%>
            <%: Html.ValidationMessageFor(model => model.StudentRole)%>
        </div>
        <p>
            <input type="submit" value="保存" />
        </p>
    </fieldset>
<% } %>

<script type="text/javascript" src="<%: Url.Content("~/Scripts/MicrosoftMvcJQueryValidation.js") %>"></script>
<script type="text/javascript">
    $(function () {
        initForm($("#dialogPanel"), $("#formsetting"), null, null, function () { $.unblockUI() });

    })
</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Header" runat="server">
<script type="text/javascript" src="<%: Url.Content("~/Scripts/jquery.form.js") %>"></script>
<script type="text/javascript" src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>"></script>
</asp:Content>

